package itheima.d05;

import java.util.TreeSet;

public class Test {
    public static void main(String[] args) {
        TreeSet<Student> set = new TreeSet<>();
        Student s1 = new Student("小红", 20, "女",80);
        Student s2 = new Student("小王", 17, "男",100);
        Student s3 = new Student("小华", 20, "男",90);
        set.add(s1);
        set.add(s2);
        set.add(s3);

        set.forEach(System.out::println);


    }

}
